﻿
using System;

namespace AgileBoard.Dtos.Mappers
{
    public class BaseDTOMapper
    {
        public static AllManagerFactory ManagerFactory
        {
            get
            {
                /*if (Manager != null) return Manager;

                var webApplicationContext =
                    ContextRegistry.GetContext() as WebApplicationContext;
                var manager =
                    webApplicationContext.GetObject("ManagerFactory") as AllManagerFactory;*/

                throw new InvalidOperationException("Nu einregistrat in IoC AllManagerFactory, inregistreaza-l");

                return null;
            }
        }

        public static AllManagerFactory Manager { get; set; }
    }

    public static class Extensions
    {
        public static DateTime ToLocalTime(this DateTime UTC)
        {
            return TimeZone.CurrentTimeZone.ToLocalTime(UTC);
        }
    }
}